<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js"></script>
		<script src="js/axios.min.js"></script>
		<link rel="stylesheet" href="css/bootstrap.min.css">
	</head>
	<body>
		<div id="app">
			<form>
				<h1 style="color: aquamarine;">用户登录</h1>
				用户名:<input type="text" v-model="name"><br>
				用户密码: <input type="password" v-model="password"><br>
				<input type="button" value="登录" @click="login()">
			</form>
			<table class="table table-bordered">
				<tr>
					<td>门店ID</td>
					<td>门店名称</td>
					<td>门店位置</td>
					<td>门店电话</td>
				</tr>
				<tr v-for="v in shops">
					<td>{{v.ID}}</td>
					<td>{{v.name}}</td>
					<td>{{v.address}}</td>
					<td>{{v.tel}}</td>
				</tr>
			</table>
		</div>
	</body>
</html>
<script>
	var app = new Vue ({
		el:"#app",
		data:{
			shops:[],
			name:"",
			password:"",
			name:"",
			address:"",
			tel:"",
		},methods:{
			
		},created:function(){
			axios.get("http://127.0.0.1:8080/list").then(function(res){
				console.log(res.data.data)
				app.shops=res.data.data
			})
		}
	})
</script>